package keeto.com.vn.classfied.model;

import java.util.EnumMap;

import keeto.com.vn.classified.config.IConstant;


public abstract class AbstractRoster implements IConstant {

	public static final int UNSUBSCRIBED = 0;
	public static final int SUBSCRIBED = 1;
	public static final int SUBSCRIBE = 2;
	public static final int UNSUBSCRIBE   = 3;

	public enum Key {
		NickName
	};

	/**
	 * localId:		the id in the DB	
	 * remoterId:	the id in the Server
	 * type:		Distinguish between types TYPE_BUITIN&TYPE_GATEWAY.
	 * displayPicLocalId	the id of displayPicture in the DB.
	 * lastUpdate 	type:long
	 * properties	for the more info
	 * group		may a roster in a few groups
	 */
	private long localId  = UNINITIALIZED_LONG;
	protected String remoterId = UNINITIALIZED_STRING;
	protected int type = TYPE_BUITIN;
	private String rosterName= UNINITIALIZED_STRING;
	private String displayName = UNINITIALIZED_STRING;
	private String statusMessage = UNINITIALIZED_STRING;
	private String presence	=UNINITIALIZED_STRING;
	private int subScription=SUBSCRIBED;
	private long displayPicLocalId = UNINITIALIZED_LONG;
	private long lastUpdate = UNINITIALIZED_LONG;
	private int specialBuddyType = UNINITIALIZED_INT_ZERO;
	private String userId = UNINITIALIZED_STRING;
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public int getSpecialBuddyType() {
		return specialBuddyType;
	}

	public void setSpecialBuddyType(int specialBuddyType) {
		this.specialBuddyType = specialBuddyType;
	}


	public void setRemoterId(String remoterId) {
		this.remoterId = remoterId;
	}

	public String getRemoterId() {
		return remoterId;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getType() {
		return type;
	}

	public void setLastUpdate(long lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	public long getLastUpdate() {
		return lastUpdate;
	}

	public void setRosterName(String rosterName) {
		this.rosterName = rosterName;
	}

	public String getRosterName() {
		return rosterName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setSubScription(int subScription) {
		this.subScription = subScription;
	}

	public int getSubScription() {
		return subScription;
	}

	public void setDisplayPicLocalId(long displayPicLocalId) {
		this.displayPicLocalId = displayPicLocalId;
	}

	public long getDisplayPicLocalId() {
		return displayPicLocalId;
	}

	public void setStatusMessage(String statusMessage) {
		this.statusMessage = statusMessage;
	}

	public String getStatusMessage() {
		return statusMessage;
	}

	public void setPresence(String presence) {
		this.presence = presence;
	}

	public String getPresence() {
		return presence;
	}

	public void setLocalId(long localId) {
		this.localId = localId;
	}

	public long getLocalId() {
		return localId;
	}

	@Override
	public String toString() {
		return "AbstractRoster [localId=" + localId + ", remoterId="
				+ remoterId + ", type=" + type + ", rosterName=" + rosterName
				+ ", displayName=" + displayName + ", statusMessage="
				+ statusMessage + ", presence=" + presence + ", subScription="
				+ subScription + ", displayPicLocalId=" + displayPicLocalId
				+ ", lastUpdate=" + lastUpdate + ", specialBuddyType="
				+ specialBuddyType + ", userId=" + userId + ", properties="
				+ "]";
	}
}
